/* GUI CONVERTED from rwwcrp.p (converter v1.75) Sat Aug 12 23:18:27 2000 */
/* rwwcrp.p - WORK CENTER REPORT                                        */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* web convert rwwcrp.p (converter v1.00) Fri Oct 10 13:57:20 1997 */
/* web tag in rwwcrp.p (converter v1.00) Mon Oct 06 14:17:46 1997 */
/*F0PN*/ /*K0ZV*/ /*                                                    */
/*V8:ConvertMode=FullGUIReport                                 */
/* REVISION: 1.0      LAST MODIFIED: 05/12/86   BY: PML       */
/* REVISION: 4.0      LAST MODIFIED: 02/17/88   BY: RL  *A171**/
/* REVISION: 4.0      LAST MODIFIED: 02/24/88   BY: WUG *A175**/
/* REVISION: 4.0      LAST MODIFIED: 03/28/88   BY: EMB *A192**/
/* REVISION: 6.0      LAST MODIFIED: 05/04/90   BY: RAM *D018**/
/* REVISION: 6.0      LAST MODIFIED: 11/02/90   BY: emb *D175**/
/* REVISION: 7.3      LAST MODIFIED: 02/24/93   BY: sas *G729*/
/* REVISION: 8.5      LAST MODIFIED: 07/31/96   BY: *J12T* Sue Poland         */
/* REVISION: 8.6      LAST MODIFIED: 10/15/97   BY: bvm *K0ZV**/

/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb                  */
         /* DISPLAY TITLE */

/*GUI global preprocessor directive settings */
&GLOBAL-DEFINE PP_PGM_RP TRUE
&GLOBAL-DEFINE PP_ENV_GUI TRUE


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

         {mfdtitle.i "b+ "}/*G729*/

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE rwwcrp_p_1 "Run Crew"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

         define variable wkctr like wc_wkctr.
         define variable wkctr1 like wc_wkctr.
         define variable last_wc like wc_wkctr.

         /* SELECT FORM */
         
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
            
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
wkctr          colon 25
            wkctr1         label {t001.i}
          SKIP(.4)  /*GUI*/
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER.
 F-a-title = &IF (DEFINED(SELECTION_CRITERIA) = 0)
  &THEN " Selection Criteria "
  &ELSE {&SELECTION_CRITERIA}
  &ENDIF .
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame a =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame a + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5. /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



         /* SET EXTERNAL LABELS */
         setFrameLabels(frame a:handle).

         /* REPORT BLOCK */

/*K0ZV*/ {wbrp01.i}

         
/*GUI*/ {mfguirpa.i true  "printer" 132 }

/*GUI repeat : */
/*GUI*/ procedure p-enable-ui:


            if wkctr1 = hi_char then wkctr1 = "".

/*K0ZV*/    if c-application-mode <> 'web' then
            
run p-action-fields (input "display").
run p-action-fields (input "enable").
end procedure. /* p-enable-ui, replacement of Data-Entry GUI*/

/*GUI*/ procedure p-report-quote:


/*K0ZV*/ {wbrp06.i &command = update &fields = "  wkctr wkctr1" &frm = "a"}

/*K0ZV*/ if (c-application-mode <> 'web') or
/*K0ZV*/ (c-application-mode = 'web' and
/*K0ZV*/ (c-web-request begins 'data')) then do:

            if wkctr1 = "" then wkctr1 = hi_char.

            bcdparm = "".
            {mfquoter.i wkctr  }
            {mfquoter.i wkctr1 }

            last_wc = ?.

/*K0ZV*/ end.

            /* SELECT PRINTER - USES VARIABLES DEV AND PGE */
            
/*GUI*/ end procedure. /* p-report-quote */
/*GUI - Field Trigger Section */

/*GUI MFSELxxx removed*/
/*GUI*/ procedure p-report:
/*GUI*/   {gpprtrpa.i  "printer" 132}
/*GUI*/   mainloop: do on error undo, return error on endkey undo, return error:



            {mfphead.i}

            for each wc_mstr where (wc_wkctr >= wkctr) and (wc_wkctr <= wkctr1)
            no-lock with frame b width 132 no-attr-space:

                /* SET EXTERNAL LABELS */
                setFrameLabels(frame b:handle).

/*J12T*         REMOVE QAD_WKFL FLAG TO DETERMINE SERVICE W/C'S...
./*G729*/       if can-find(qad_wkfl where qad_key1 = "wc_fsm" and
./*G729*/           qad_key2 = wc_wkctr) then next.
.*J12T*/
                /* DON'T PRINT 'SERVICE' WORK CENTERS */
/*J12T*/        if wc_fsm_type = "FSM" then next.

                if last_wc <> ? and last_wc <> wc_wkctr then put skip(1).
                if page-size - line-counter < 2 then do:
               page.
               last_wc = ?.
                end.
                if last_wc <> wc_wkctr then display wc_wkctr with frame b STREAM-IO /*GUI*/ .
                last_wc = wc_wkctr.

                display
                    wc_mch
/*D018              wc_dept wc_lbr_cap wc_men_mch */
/*D018*/            wc_dept            wc_men_mch column-label {&rwwcrp_p_1}
                    wc_mch_op
                    wc_lbr_rate wc_bdn_rate wc_bdn_pct wc_mch_bdn wc_queue wc_wait
                    wc_mch_wkctr WITH STREAM-IO /*GUI*/ .

                put skip wc_desc at 10.

                
/*GUI*/ {mfguirex.i } /*Replace mfrpexit*/


            end.    /* for each wc_mstr */

            /* REPORT TRAILER  */
            
/*GUI*/ {mfguitrl.i} /*Replace mfrtrail*/

/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/


         end.   /* repeat */

/*K0ZV*/ {wbrp04.i &frame-spec = a}

/*GUI*/ end procedure. /*p-report*/
/*GUI*/ {mfguirpb.i &flds=" wkctr wkctr1 "} /*Drive the Report*/
